#include <iostream>
#include <sstream>
#include <string>

using std::cout;
using std::endl;
using std::ostringstream;
using std::string;

//想将一个int类型的数据转换为string类型的数据
string int2String(int number)
{
    ostringstream oss;
    oss << number;

    return oss.str();
}

void test()
{
    int value = 100;
    string s1 = int2String(value);
    cout << "s1 = " << s1 << endl;
}

int main(int argc, char *argv[])
{
    test();
    return 0;
}

